// Test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>
#include <string>
using namespace std;

typedef char* (*MyPROC)(char* );
typedef bool (*ReadDatFile)(string );

BYTE buff[2048];

int _tmain(int argc, _TCHAR* argv[])
{
	unsigned char* pb = buff;
	HINSTANCE hLib = LoadLibrary(TEXT("ControllerLib.dll"));
	MyPROC GetExternData;
	ReadDatFile ReadFile;
	if(hLib!=NULL)
	{
		// GetExternData = (MyPROC)GetProcAddress(hLib,("GetDataBuffer"));
		ReadFile = (ReadDatFile)GetProcAddress(hLib,("ReadDatFile"));
		if(ReadFile!=NULL)
		{
			//(GetExternData)("sh.hex");
			ReadFile("externd.dat");

		}

		FreeLibrary(hLib);
	}
	return 0;
}

